package cn.outsourcing.supermarket.converter;

import cn.outsourcing.supermarket.converter.transform.BooleanToIntegerTransform;
import cn.outsourcing.supermarket.po.HiolabsAddress;
import cn.outsourcing.supermarket.vo.hiolabs.HiolabsAddressVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 地址转换器
 *
 * @author gzkemays
 * @since 2021/10/23 17:01
 */
@Mapper(uses = {BooleanToIntegerTransform.class})
public interface HiolabsAddressConverter {
  HiolabsAddressConverter INSTANCE = Mappers.getMapper(HiolabsAddressConverter.class);

  /**
   * 转化为自身值对象
   *
   * @param address 原 po 对象
   * @return 值对象
   */
  HiolabsAddressVO convertToVo(HiolabsAddress address);
}
